<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:ctl="http://arche.auction.co.kr/WebControl/XmlControl" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:s="http://schema.auction.co.kr/Arche.Stores.xsd" xmlns:ms="urn:schemas-microsoft-com:xslt"
	xmlns:ARCHE="http://www.auction.co.kr/xsltFunc" exclude-result-prefixes="ctl s">
	<!--<xsl:output indent="yes" method="html" encoding="ks_c_5601-1987" />-->
	<xsl:output indent="yes" method="html" encoding="utf-8" />
	<xsl:param name="Params" />
	<xsl:param name="Paging" />
	<xsl:param name="AsrtCode" />
	<xsl:param name="PageLink"  select="concat($Params/PageBaseUrl, '?asrt_code=', $AsrtCode, '&amp;kind=',$Params/Kind, '&amp;filter=',$Params/Filter , '&amp;sort=',$Params/Sort  )"/>
	<xsl:variable name="PageNoData">
		<xsl:call-template name="GenPageNoData">
			<xsl:with-param name="StartPageIndex" select="$Paging/StartPageIndex" />
		</xsl:call-template>
	</xsl:variable>
	<xsl:variable name="SelectPageComboData">
		<xsl:call-template name="GenSelectPageComboData" />
	</xsl:variable>
	<!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  Start TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
	<xsl:template match="/">
<!--		<XMP>
			<xsl:copy-of select="$Params" />
		</XMP>
		<XMP>
			<xsl:copy-of select="$Paging" />
		</XMP>
-->

		<xsl:choose>
			<xsl:when test="$Paging/PageCount &gt; 0">
				<xsl:apply-templates select="/*" />
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="NoItem" />
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  ArrayOfItemListingT TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
	<xsl:template match="/*">
		<base href="http://www.auction.co.kr" />
		<!-- 리스팅 헤더 시작 -->
		<table border='0' cellspacing='0' cellpadding='0' align="center">
			<xsl:attribute name="width">
				<xsl:value-of select="$Params/TableWidth" />
			</xsl:attribute>
			<tr>
				<td width='260'>
					<img src='/auction/image/blank.gif' width='3' height='8'></img>
					<a>
						<xsl:attribute name="href">
							<xsl:value-of select="concat($Params/FrontUrlBase,'/store.aspx?store_id=', $Params/StoreID, '&amp;categorySeqNo=', $Params/CategorySeqNo, '&amp;kind=A')" />
						</xsl:attribute>
						<font color='#0000FF'>
							<xsl:if test="$Params/Kind='A'">
								<xsl:attribute name="style">font-weight:bold;</xsl:attribute>
							</xsl:if>
							<u>
								<span name='selectedKindA' id='selectedKindA'>전체</span>
							</u>
						</font>
					</a> <img src='/auction/image/blank.gif' width='3' height='8'></img>I<img src='/auction/image/blank.gif' width='3' height='8'></img>
					<a>
						<xsl:attribute name="href">
							<xsl:value-of select="concat($Params/FrontUrlBase,'/store.aspx?store_id=', $Params/StoreID, '&amp;categorySeqNo=', $Params/CategorySeqNo, '&amp;kind=N')" />
						</xsl:attribute>
						<font color='#0000FF'>
							<xsl:if test="$Params/Kind='N'">
								<xsl:attribute name="style">font-weight:bold;</xsl:attribute>
							</xsl:if>
							<u>일반경매</u>
						</font>
					</a> <img src='/auction/image/blank.gif' width='3' height='8'></img>I<img src='/auction/image/blank.gif' width='3' height='8'></img>
					<a>
						<xsl:attribute name="href">
							<xsl:value-of select="concat($Params/FrontUrlBase,'/store.aspx?store_id=', $Params/StoreID, '&amp;categorySeqNo=', $Params/CategorySeqNo, '&amp;kind=F')" />
						</xsl:attribute>
						<font color='#0000FF'>
							<xsl:if test="$Params/Kind='F'">
								<xsl:attribute name="style">font-weight:bold;</xsl:attribute>
							</xsl:if>
							<u>
								<span name='selectedKindF' id='selectedKindF'>즉시구매</span>
							</u>
						</font>
					</a> <img src='/auction/image/blank.gif' width='3' height='8'></img>I<img src='/auction/image/blank.gif' width='3' height='8'></img>
					<a>
						<xsl:attribute name="href">
							<xsl:value-of select="concat($Params/FrontUrlBase,'/store.aspx?store_id=', $Params/StoreID, '&amp;categorySeqNo=', $Params/CategorySeqNo, '&amp;kind=C')" />
						</xsl:attribute>
						<font color='#0000FF'>
							<xsl:if test="$Params/Kind='C'">
								<xsl:attribute name="style">font-weight:bold;</xsl:attribute>
							</xsl:if>
							<u>
								<span name='selectedKindC' id='selectedKindC'>공동경매</span>
							</u>
						</font>
					</a>
		   		</td>
				<td width='325' class='gray_txt' align='right'>
					<xsl:call-template name="FilterSortPara" />
				</td>
			</tr>
			<tr>
				<td colspan='2'>
					<img src='/auction/image/blank.gif' width='20' height='6'></img>
				</td>
			</tr>
		</table>
		<!-- 리스팅 헤더 끝 -->
		<!-- 물품목록 표시 시작 -->
		<xsl:call-template name="RenderTable" />
		<!-- 물품목록 표시 끝 -->
		<base href="storesdev.auction.co.kr" />
		<!-- page index 시작 -->
		<table align="center">
			<xsl:attribute name="width">
				<xsl:value-of select="$Params/TableWidth" />
			</xsl:attribute>
			<TR><TD height="20"></TD></TR>
			<tr>
			
				<td align="center">
					<xsl:call-template name="PageIndexList" />
				</td>
			</tr>
		</table>
		<!-- page index 끝 -->
	</xsl:template>
	<!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  RenderTable TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
	<xsl:template name="RenderTable">
		<TABLE cellSpacing="0" cellPadding="0" align="center" border="0">
			<TR>
				<TD height="5">
					<xsl:attribute name="width">
						<xsl:value-of select="$Params/TableWidth" />
					</xsl:attribute>
				</TD>
			</TR>
			<TR>
				<TD>
					<xsl:attribute name="width">
						<xsl:value-of select="$Params/TableWidth" />
					</xsl:attribute>
					<TABLE cellSpacing="2" cellPadding="0" border="0">
						<xsl:attribute name="width">
							<xsl:value-of select="$Params/TableWidth" />
						</xsl:attribute>
						<TR align="middle" bgColor="#E1E6FF" height="24">
							<TD class="gray_txt" vAlign="center" width="101" colSpan="2">
								<IMG style="CURSOR: hand" onclick="itemCompare();" height="21" src="/image/list/btnCompare.gif"
									width="79" align="absMiddle" border="0" />
							</TD>
							<TD class="gray_txt" width="480" rowSpan="2">
								<FONT color="#2c85a2">
									<B>물품명</B>
								</FONT>
							</TD>
							<TD class="gray_txt" width="60" rowSpan="2">
								<FONT color="#2c85a2">
									<B>현재가</B>
								</FONT>
							</TD>
							<TD class="gray_txt" width="100" rowSpan="2">
								<SELECT id="selMode" onchange="javascript:viewLeftOver(this.selectedIndex);window.focus();"
									name="selMode">
									<OPTION selected="selected">종료일시</OPTION>
									<OPTION>남은시간</OPTION>
								</SELECT>
							</TD>
							<TD class="gray_txt" width="40" rowSpan="2">
								<FONT color="#2c85a2">
									<B>입찰</B>
								</FONT>
							</TD>
						</TR>
						<TR align="middle" bgColor="#E1E6FF" height="15">
							<TD class="gray_txt" vAlign="bottom" width="31">
								<FONT color="#2c85a2">
									<B>선택</B>
								</FONT>
							</TD>
							<TD class="gray_txt" vAlign="bottom" width="70">
								<FONT color="#2c85a2">
									<B>사진</B>
								</FONT>
							</TD>
						</TR>
						<!-- 아이템 항목 표시 -->
						<xsl:variable name="BeginItemIndex" select="($Paging/PageIndex * $Paging/PageSize) - ($Paging/StartDataIndex)" />
						<xsl:variable name="EndItemIndex" select="$BeginItemIndex + $Paging/PageSize" />
						<xsl:apply-templates select="s:ItemListingT[@ItemNo and position() &gt;= $BeginItemIndex and position() &lt;= $EndItemIndex]" />
					</TABLE>
				</TD>
			</TR>
		</TABLE>
	</xsl:template>
	<!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  ItemListingT TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
	<xsl:template match="s:ItemListingT">
		<TR align="middle">
			<xsl:attribute name="bgColor">
				<xsl:choose>
				<!-- 홀수행과 짝수행을 구분지어서 bgColor가 다르게 설정되도록 합니다 -->
					<xsl:when test="position() mod 2 = 1">#F2F2F2</xsl:when>
					<xsl:otherwise>#ffffff</xsl:otherwise>
				</xsl:choose>
			</xsl:attribute>
			<TD class="gray_txt" height="15">
				<INPUT onclick="chkItem(this, this.value);" type="checkbox" name="chkCompare">
					<xsl:attribute name="value">
						<xsl:value-of select="@ItemNo" />
					</xsl:attribute>
				</INPUT>
			</TD>
			<TD class="gray_txt" height="30">
				<xsl:choose>
					<xsl:when test="contains(@Decorate,'P')">
						<A>
							<xsl:attribute name="href">/buy/detail_view.asp?itemno=<xsl:value-of select="@ItemNo" /></xsl:attribute>
							<IMG height="60" width="60" border="0">
								<xsl:attribute name="src"><xsl:value-of select ="$Params/ItemImageUrl"/>/itemimage<xsl:value-of select="@FirstImagePath" /></xsl:attribute>
							</IMG>
						</A>
					</xsl:when>
					<xsl:otherwise>
						<xsl:if test="contains(@Decorate,'N')"><IMG src='./image/img_eye.gif' border='0' hspace='1' /></xsl:if>
						<xsl:if test="contains(@Decorate,'I')"><IMG src='./image/img_photo.gif' border='0' hspace='1' alt='photo' /></xsl:if>
					</xsl:otherwise>
				</xsl:choose>
			</TD>
			<TD class="gray_txt" align="left">
				<!--B-->
				<A class="link_listcolor">
					<xsl:attribute name="href">/buy/detail_view.asp?itemno=<xsl:value-of select="@ItemNo" /></xsl:attribute>
					<xsl:value-of select="ARCHE:GetItemName(string(@Name))" />
				</A>
				<!--/B-->
				<xsl:if test="contains(@Decorate, 'O')">
					<IMG src='/image/list/img_gb.gif' hspace='1' border='0' />
				</xsl:if>
				<xsl:if test="contains(@Decorate, 'P') and contains(@Decorate, 'N') ">
					<IMG src='/image/list/img_eye.gif' hspace='1' border='0' />
				</xsl:if>
				<xsl:if test="contains(@Decorate, 'T')">
					<IMG src="/image/list/img_tran.gif" hspace="1" border="0" />
				</xsl:if>
				<xsl:if test="contains(@Decorate, 'C')">
					<IMG src="/image/list/img_card.gif" hspace="1" border="0" />
				</xsl:if>
				<xsl:if test="contains(@Decorate, 'U') or contains(@Decorate, 'V')">
					<IMG src="/image/list/img_freeinterest.gif" hspace="1" border="0" />
				</xsl:if>
				<xsl:if test="contains(@Decorate, 'M')">
					<IMG src="/image/list/img_money.gif" hspace="1" border="0" />
				</xsl:if>
				<xsl:if test="contains(@Decorate, 'D')">
					<IMG src="/image/list/freeDelivery.gif" hspace="1" border="0" />
				</xsl:if>
			</TD>
			<TD class="gray_txt" align="right" height="45" nowrap="true" style="DIRECTION: rtl; TEXT-INDENT: 3px; PADDING-RIGHT: 4px;">
				<B>
					<xsl:value-of select="format-number(@NowPrice, '#,###.' )" />
				</B>
				<xsl:if test="@Method='4410' and @MaxPrice &gt;0 ">
			<BR />(<xsl:value-of select="format-number(@MaxPrice, '#,###')" />)
        </xsl:if>
			</TD>
			<TD class="gray_txt" width="94">
				<span id="txtTimeLeft" style="BORDER-RIGHT: #f2f2f2 0px solid; BORDER-TOP: #f2f2f2 0px solid; FONT-SIZE: 9pt;  BORDER-LEFT: #f2f2f2 0px solid; WIDTH: 94px; BORDER-BOTTOM: #f2f2f2 0px solid; TEXT-ALIGN: center"
					name="txtTimeLeft">
					<xsl:attribute name="CloseTime">
						<xsl:value-of select="@LastDate" />
					</xsl:attribute>
					<xsl:attribute name="ServerTime">
						<xsl:value-of select="@CurrentDate" />
					</xsl:attribute>
					<!--<xsl:value-of select="concat(ms:format-date(@LastDate, 'MM/dd'), ' ', ms:format-time(@LastDate, 'hh:mm'))" />-->
					<xsl:value-of select="ARCHE:get_formattedDateText(string(@LastDate))" />
				</span>
			</TD>
			<TD class="gray_txt">
				<xsl:value-of select="@BidCount" />
			</TD>
		</TR>
	</xsl:template>
	<!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  FilterSortPara TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
	<xsl:template name="FilterSortPara">
		<TABLE cellSpacing="0" cellPadding="0" width="300" align="right" border="0">
			<TR>
				<TD width="9">
					<IMG height="30" src="http://stores.auction.co.kr/auction/image/order_left_grey.gif" />
				</TD>
				<TD align="middle" width="100" bgColor="#E1E1E1">
					<B>
						<FONT color="#6C81DD">정렬방식:</FONT>
						<xsl:text></xsl:text>
					</B>
				</TD>
				<TD width="220" bgColor="#E1E1E1">
					<B>
						<FONT color="white">
							<SELECT class="gray_txt" style="FONT-SIZE: 12px; BACKGROUND-COLOR: rgb(238,238,238)" name="selFilter"
								align="absMiddle" size="1" onchange="__doPostBack(event.srcElement.name,'');">
								<OPTION value="">
							<xsl:if test="$Params/Filter=&quot;&quot;">
										<xsl:attribute name="selected">selected</xsl:attribute>
									</xsl:if>
										전체
									</OPTION>
								<OPTION value="NEW">
							<xsl:if test="$Params/Filter=&quot;NEW&quot;">
										<xsl:attribute name="selected">selected</xsl:attribute>
									</xsl:if>
										새물품
									</OPTION>
								<OPTION value="USED">
							<xsl:if test="$Params/Filter=&quot;USED&quot;">
										<xsl:attribute name="selected">selected</xsl:attribute>
									</xsl:if>
										중고물품
									</OPTION>
								<OPTION value="PHOTO">
							<xsl:if test="$Params/Filter=&quot;PHOTO&quot;">
										<xsl:attribute name="selected">selected</xsl:attribute>
									</xsl:if>
										Photo Gallery
									</OPTION>
							</SELECT>
							<SELECT class="gray_txt" style="FONT-SIZE: 12px; BACKGROUND-COLOR: rgb(238,238,238)" align="absMiddle"
								size="1" name="selSort" onchange="__doPostBack(event.srcElement.name,'');">
								<OPTION value="TA">
										<xsl:if test="$Params/Sort=&quot;TA&quot;">
										<xsl:attribute name="selected">selected</xsl:attribute>
									</xsl:if>
										마감임박순
									</OPTION>
								<OPTION value="TD">
										<xsl:if test="$Params/Sort=&quot;TD&quot;">
										<xsl:attribute name="selected">selected</xsl:attribute>
									</xsl:if>
										신규등록순
									</OPTION>
								<OPTION value="MA">
										<xsl:if test="$Params/Sort=&quot;MA&quot;">
										<xsl:attribute name="selected">selected</xsl:attribute>
									</xsl:if>
										낮은가격순
									</OPTION>
								<OPTION value="MD">
										<xsl:if test="$Params/Sort=&quot;MD&quot;">
										<xsl:attribute name="selected">selected</xsl:attribute>
									</xsl:if>
										높은가격순
									</OPTION>
								<OPTION value="BD">
										<xsl:if test="$Params/Sort=&quot;BD&quot;">
										<xsl:attribute name="selected">selected</xsl:attribute>
									</xsl:if>
										많은입찰자순
									</OPTION>
							</SELECT>
						</FONT>
					</B>
				</TD>
				<TD width="11">
					<IMG height="30" src="http://stores.auction.co.kr/auction/image/order_right_grey.gif"
						width="9" />
				</TD>
			</TR>
		</TABLE>
	</xsl:template>
	<!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  PageIndexList TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
	<xsl:template name="PageIndexList">
		<xsl:variable name="PageNo_NodeSet" select="ms:node-set($PageNoData)" />
		<!-- call-template Prev10Page -->
		<xsl:if test="$Paging/StartPageIndex &gt; 10">
			<xsl:call-template name="Prev10Page" />
		</xsl:if>
		<!-- call-template Prev10Page -->
		<img height="10" src="/image/list/pageblank.gif" width="6" />
		<xsl:for-each select="$PageNo_NodeSet/*">
			<a class="pageNavigate">
				<xsl:attribute name="href">
					<xsl:value-of select="concat($PageLink, '&amp;page=', current())" />
				</xsl:attribute>
				<xsl:if test="current() = $Paging/PageIndex +1">
					<xsl:attribute name="style">color: red</xsl:attribute>
				</xsl:if>
				<strong>
					<xsl:value-of select="current()" />
				</strong>
			</a>
			<img height="10" src="/image/list/pageblank.gif" width="6" />
		</xsl:for-each>
		<!-- call-template Next10Page -->
		<xsl:if test="$PageNo_NodeSet/PageNo[position() = last()] &lt; $Paging/PageCount">
			<xsl:call-template name="Next10Page" />
		</xsl:if>
		<!-- call-template Next10Page -->
		<!--<img height="10" src="/image/list/pageblank.gif" width="6" />-->
		<xsl:call-template name="nbsp">
			<xsl:with-param name="Count" select="3" />
		</xsl:call-template>
		<!--xsl:value-of select="count(SelectPageComboData/PageNo)" />
		<xsl:if test="count(/SelectPageComboData/PageNo) &gt; -1"-->
		<xsl:if test=" $Paging/PageCount > 1 ">
			<FONT color="#000000">페이지 바로이동:</FONT>
			<select id="selPage" name="selPage" width="10" >
				<xsl:for-each select="ms:node-set($SelectPageComboData)/*">
					<option>
						<xsl:attribute name="value">
							<xsl:value-of select="current()" />
						</xsl:attribute>
						<xsl:if test="current() = $PageNo_NodeSet/PageNo[position() = 1]">
							<xsl:attribute name="selected">selected</xsl:attribute>
						</xsl:if>
						<xsl:value-of select="concat(current(), '/', $Paging/PageCount)" />
					</option>
				</xsl:for-each>
			</select>
		</xsl:if>
	</xsl:template>
	<!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  GenPageNoData TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
	<xsl:template name="GenPageNoData">
		<xsl:param name="StartPageIndex" select="1" />
		<xsl:param name="CurrentPageIndex" select="$StartPageIndex" />
		<xsl:param name="Count" select="10" />
		<PageNo>
			<xsl:value-of select="$CurrentPageIndex" />
		</PageNo>
		<xsl:if test="$CurrentPageIndex &lt; ($StartPageIndex + $Count - 1) and $CurrentPageIndex &lt; $Paging/PageCount">
			<xsl:call-template name="GenPageNoData">
				<xsl:with-param name="StartPageIndex" select="$StartPageIndex" />
				<xsl:with-param name="CurrentPageIndex" select="$CurrentPageIndex + 1" />
				<xsl:with-param name="Count" select="$Count" />
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  GenSelectPageComboData TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
	<xsl:template name="GenSelectPageComboData">
		<xsl:param name="CurrentPageIndex" select="1" />
		<xsl:param name="Step" select="1" />
		<xsl:if test="$CurrentPageIndex &lt; $Paging/PageCount">
			<PageNo>
				<xsl:value-of select="$CurrentPageIndex" />
			</PageNo>
			<xsl:call-template name="GenSelectPageComboData">
				<xsl:with-param name="CurrentPageIndex" select="$CurrentPageIndex + $Step" />
				<xsl:with-param name="Step" select="$Step" />
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
	<!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  Prev10Page TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
	<xsl:template name="Prev10Page">
		<a class="pageNavigate">
			<xsl:attribute name="href">
				<xsl:value-of select="concat($PageLink, '&amp;page=', 1)" />
			</xsl:attribute>
			<strong>1</strong>
		</a>
		<img height="10" src="/image/list/pageblank.gif" width="6" />
		<xsl:text>←</xsl:text>
		<a class="pageNavigate">
			<xsl:attribute name="href">
				<xsl:value-of select="concat($PageLink, '&amp;page=', $Paging/StartPageIndex -10)" />
			</xsl:attribute>
			이전10개
		</a>
	</xsl:template>
	<!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  Next10Page TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
	<xsl:template name="Next10Page">
		<a class="pageNavigate" >
			<xsl:attribute name="href">
				<xsl:value-of select="concat($PageLink, '&amp;page=', $Paging/StartPageIndex + 10 )" />
			</xsl:attribute>
		다음10개</a>
		<xsl:text>→</xsl:text>
		<img height="10" src="/image/list/pageblank.gif" width="6" />
		<a class="pageNavigate" >
			<xsl:attribute name="href">
				<xsl:value-of select="concat($PageLink, '&amp;page=', $Paging/PageCount)" />
			</xsl:attribute>
			<strong>
				<xsl:value-of select="$Paging/PageCount" />
			</strong>
		</a>
	</xsl:template>
	<!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  nbsp TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
	<xsl:template name="nbsp">
		<xsl:param name="Index" select="1" />
		<xsl:param name="Count" select="1" />
		<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
		<xsl:if test="$Index &lt; $Count">
			<xsl:call-template name="nbsp">
				<xsl:with-param name="Index" select="$Index + 1" />
				<xsl:with-param name="Count" select="$Count" />
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
 <!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  No Item TEMPLATE
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
	<xsl:template name="NoItem">
		<center><br /><a href="javascript:history.back()"><img src="/auction/image/non_product.gif" width="493" height="233" border="0" vspace="4" align="center" /></a></center>
	</xsl:template>	

	
	<!--
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  XSL SCRIPT 
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  -->
	<ms:script language="JScript" implements-prefix="ARCHE">
<![CDATA[

	function get_formattedDateText( dateValue )
	{
		if ( dateValue == "NAN") return ;
		var dateTime = dateValue.split( "T" );
	
		var datePart = dateTime[0].split( "-" );
		var timePart = dateTime[1].split( ":" );
		
		return datePart[1] + "/" + datePart[2] + " " + timePart[0] + ":" + timePart[1];
	}
	
	function get_leftDateTime(closeTime, nowTime)
	{
		var str = "";
		var iDay = 0,iHour,	iMin;
		var closeDate = GetDateFromXML(closeTime);
		var serverNow = GetDateFromXML(nowTime);
		var iMinGap = (closeDate-serverNow)/(1000*60) ;
			
		if(iMinGap < 0)
			str = "경매종료";
		else if(iMinGap == 0)
			str = "마감임박";
		else {
			iDay= Math.floor(iMinGap/(60*24));
			iMinGap = iMinGap - (iDay * 60 * 24);
			iHour = Math.floor(iMinGap/60);
			iMin = iMinGap - (iHour * 60);

			if (iDay > 0) str = iDay.toString() + "일";
			if (iHour > 0) str = str + " " + iHour + "시간";
			if (iMin > 0) str = str + " " + iMin + "분";
		}
		if (iDay<1) str = "<font color='#FF0000'>" + str + "</font>";
		return str;
	}
	function GetItemName(itemName)
	{	
		var strName = itemName;
		var i;
		if(itemName.length > 36){
			strName = strName.substring(0,33);
					strName = strName + "..."
			
		}
		return strName;
	}
]]>
</ms:script>
</xsl:stylesheet>